function OnClickAxes( hax, evt )
 
point1 = get(hax,'CurrentPoint'); % corner where rectangle starts ( initial mouse down point )
rbbox
point2 = get(hax,'CurrentPoint'); % corner where rectangle stops ( when user lets go of mouse )
 
% Now lets iterate through all lines in the axes and extract the data that lies within the selected region
allLines = findall(hax,'type','line');
for n = 1:length(allLines)
 
   [dataInRect,dataInd] = getDataInRect( point1(1,1:2), point2(1,1:2), allLines(n) ); % not interested in z-coord
 
   % TODO: do something with dataInRect or dataInd
   dataInRect
   
end